# coding=utf-8

from jspider.douban.handler.base import BaseHandler
from jspider.douban.model.img import Img


class HomeHanlder(BaseHandler):
    def get(self):
        p = int(self.get_argument("p", 1))
        q = Img.select().limit(150).offset((p - 1) * 150)

        self.render("douban/home.html", imgs=q, p=p)
